<template>
  <div>
    <!-- 顶部导航栏 -->
    <div class="top">
      <van-icon
        @click="ret()"
        class="arrowLeft"
        style="top: 10px"
        name="arrow-left"
        color="pink"
        size="30"
      />
      <span>精彩活动</span>
    </div>

    <!-- 页面 -->
    <div class="main" v-for="(item,i) in data" :key="i">
      <img :src="item.coverImage" alt="">
      <div class="parent1">
        <span class="son1">[结束] {{item.coverTitle}}</span>
        <span class="son2">11-12 00:00截止</span>
      </div>
      <div class="parent2">
        <span>主办方:{{item.coverSummary}}</span>
        <br>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        data: []
      }
    },
    mounted(){
      this.getDate()
    },
    methods: {
      ret(){
        this.$router.push({
          path:'/wode'
        })
      },
      getDate() {
        let url =`/activity/getActivitys?_t=1666099142739&pageIndex=0&pageSize=10&all=true&timestamp=1666099142739`
        this.axios.get(url).then(res=>{
          console.log(res); 
          this.data=res.data.data.data
       })
      }
    },
  }
</script>

<style lang="scss" scoped>
.top {
  display: flex;
  height: 45px;
  .arrowLeft {
    padding-left: 10px;
  }
  span {
    font-weight: bold;
    padding-right: 30px;
    font-size: 16px;
    color: rgb(61, 60, 60);
    margin: 0 auto;
    line-height: 45px;
  }
}
.main{
  padding: 10px 15px 20px;
  .parent1{
    display: flex;
    .son1{
      font-size: 15px;
      width: 229px;
      height: 22px;
      margin: 5px 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .son2{
      font-size: 10px;
      width: 95px;
      height: 22px;
      margin: 5px;
    }
  }
  .parent2{
    width: 229px;
    height: 40px;
    span{
      font-size: 13px;
      color: #999;
    }
  }
  img{
    width: 343px;
    height: 171px;
  }
}
</style>